//
//  VideoPlayerStatus.swift
//  VideoPlayer
//
//  Created by JY_NEW on 2021/10/11.
//

import Foundation

public typealias VideoPlayerStatus = CorePlayerStatus

public enum VideoPlayerGravity: Equatable {
    /// 使用原视频高宽比自适应(默认模式,长边铺满、短边黑边)
    case aspect
    /// 使用原视频高宽比填充(短边铺满、长边裁切)
    case aspectFill
    ///  铺满(变形全铺满)
    case fill
    /// 强制指定高宽比自适应(不变形长边黑边、短边黑边)
    case resizeAspect(width: Int, height: Int)
    /// 强制指定高宽比填充(变形长边铺满、短边黑边)
    case resizeAspectFill(width: Int, height: Int)
    public static var `default`: Self {
        return .aspect
    }
}

/// 网络状态
public enum VideoPlayerNetworkStatus {
    /// 2,3,4,5G
    case wwan
    /// Wifi
    case wifi
    /// 断网
    case unreachable
    /// 是否有网
    public var isReachable: Bool {
        return self != .unreachable
    }
}
